package com.bll.imple.pictureAction;

import java.util.List;

import javax.servlet.ServletConfig;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.bean.PictureBean;
import com.bll.UploadAction;
import com.dao.PictureDao;

public class ShowMyPictureAction implements UploadAction{
	public String execute(ServletConfig servletConfig,
			HttpServletRequest request, HttpServletResponse response) {
		HttpSession session=request.getSession();
		int userId=Integer.parseInt(session.getAttribute("userId").toString());
	    String lujing=request.getParameter("lujing");
	    String position=request.getParameter("position");
	    PictureDao dao=new PictureDao();
	    List<PictureBean> list =dao.selectMy(userId, position);
	    System.out.println("userId:"+userId);
	    System.out.println("lujing:"+lujing);
	    //System.out.println("bean:"+bean);
	    request.setAttribute("pic", list);
		return lujing;
		
	}
}
